CROSS =
CC = $(CROSS)gcc

INCDIR = /home/kenny/dika-repo/include
ifeq ($(CROSS),)
LIBDIR = /home/kenny/dika-repo/lib/x86
else
LIBDIR = /home/kenny/dika-repo/lib/arm
endif

APP = ipms-cli
CFLAGS = -I `pwd` -I$(INCDIR) -ggdb
LDFLAGS = -L$(LIBDIR) -ldicom -ldicop -lpthread `xml2-config --libs`

all: $(APP)

%.o: %.c
	$(CC) -Wall -g -c $(CFLAGS) $< -o $@

$(APP): ipms_client_api.o
	$(CC) -Wall -o $@ $^ $(LDFLAGS)

clean:
	@rm -f *.o
	@rm -f $(APP)

